package com.shuda.business.monitor.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;

import java.time.LocalDateTime;

/**
 * 数据监控实体类：移除Lombok，显式提供访问器，确保MyBatis条件构造器方法引用可用。
 */
@TableName("data_monitor")
@Schema(name = "DataMonitorEntity", description = "数据监控实体")
public class DataMonitorEntity {

    @TableId(type = IdType.AUTO)
    @Schema(description = "监控数据ID")
    private Long id;

    @Schema(description = "渠道ID")
    private String channelId;

    @Schema(description = "分发方案ID")
    private String schemeId;

    @Schema(description = "数据ID")
    private String dataId;

    @Schema(description = "数据内容(JSON格式)")
    private String dataContent;

    @Schema(description = "处理状态(pending-待处理,processing-处理中,success-成功,failed-失败)")
    private String status;

    @Schema(description = "处理结果")
    private String processResult;

    @Schema(description = "异常信息")
    private String errorMessage;

    @Schema(description = "处理时间(毫秒)")
    private Long processingTime;

    @Schema(description = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @Schema(description = "处理时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime processTime;

    @Schema(description = "逻辑删除标识(0-未删除,1-已删除)")
    @TableLogic
    @TableField(fill = FieldFill.INSERT)
    private Integer deleted;

    /**
     *
     * DataMonitorEntity 访问器
     * @param $params$
     * @return $returns$
     * @author ink
     * @Description: 明确提供getter/setter，避免Lombok依赖导致方法引用失败
     * @date 2025-11-09 10:30
     */
    public Long getId() { return id; }
    public void setId(Long id) { this.id = id; }

    public String getChannelId() { return channelId; }
    public void setChannelId(String channelId) { this.channelId = channelId; }

    public String getSchemeId() { return schemeId; }
    public void setSchemeId(String schemeId) { this.schemeId = schemeId; }

    public String getDataId() { return dataId; }
    public void setDataId(String dataId) { this.dataId = dataId; }

    public String getDataContent() { return dataContent; }
    public void setDataContent(String dataContent) { this.dataContent = dataContent; }

    public String getStatus() { return status; }
    public void setStatus(String status) { this.status = status; }

    public String getProcessResult() { return processResult; }
    public void setProcessResult(String processResult) { this.processResult = processResult; }

    public String getErrorMessage() { return errorMessage; }
    public void setErrorMessage(String errorMessage) { this.errorMessage = errorMessage; }

    public Long getProcessingTime() { return processingTime; }
    public void setProcessingTime(Long processingTime) { this.processingTime = processingTime; }

    public LocalDateTime getCreateTime() { return createTime; }
    public void setCreateTime(LocalDateTime createTime) { this.createTime = createTime; }

    public LocalDateTime getProcessTime() { return processTime; }
    public void setProcessTime(LocalDateTime processTime) { this.processTime = processTime; }

    public Integer getDeleted() { return deleted; }
    public void setDeleted(Integer deleted) { this.deleted = deleted; }
}